

package com.hazelcast.instance.impl.executejar;

import com.hazelcast.jet.Job;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class ExecuteJobParameters {

    private final CopyOnWriteArrayList<Job> submittedJobs = new CopyOnWriteArrayList<>();
    private String jarPath;
    private String snapshotName;
    private String jobName;

    public ExecuteJobParameters() {
    }

    public ExecuteJobParameters(String jarPath, String snapshotName, String jobName) {
        this.jarPath = jarPath;
        this.snapshotName = snapshotName;
        this.jobName = jobName;
    }

    public String getJarPath() {
        return jarPath;
    }

    public boolean hasJarPath() {
        return jarPath != null;
    }

    public boolean hasSnapshotName() {
        return snapshotName != null;
    }

    public String getSnapshotName() {
        return snapshotName;
    }

    public boolean hasJobName() {
        return jobName != null;
    }

    public String getJobName() {
        return jobName;
    }

    public List<Job> getSubmittedJobs() {
        return submittedJobs;
    }

    public void addSubmittedJob(Job job) {
        submittedJobs.add(job);
    }
}
